Skip to content

Conversation

@smnandre
Copy link
Member

Q A
Bug fix? no
New feature? no
Deprecations? no
Documentation? no
Issues Fix #...
License MIT

src/Autocomplete/src/Form/ParentEntityAutocompleteType.php:27

        @deprecated since Symfony UX 2.13, use "Symfony\UX\Autocomplete\Form\BaseEntityAutocompleteType" instead

src/Autocomplete/src/Form/ChoiceList/Loader/ExtraLazyChoiceLoader.php:21

        @deprecated since Symfony UX 2.23 and will be removed in 3.0, use Symfony\Component\Form\ChoiceList\Loader\LazyChoiceLoader instead.

src/Autocomplete/src/Form/AutocompleteEntityTypeSubscriber.php:26

        @deprecated since Symfony UX 2.13

src/Autocomplete/src/Doctrine/EntityMetadata.php:47

    trigger_deprecation('symfony/ux-autocomplete', '2.15.0', 'Calling EntityMetadata::getPropertyMetadata() is deprecated. You should stop using it, as it will be removed in the future.');

src/Autocomplete/src/AutocompleteResultsExecutor.php:38

    trigger_deprecation('symfony/ux-autocomplete', '2.8.0', 'Passing a "%s" instance as the second argument of "%s()" is deprecated, pass a "%s" instance instead.', Security::class, __METHOD__, PropertyAccessorInterface::class);

@smnandre smnandre added this to the 3.0 milestone Sep 24, 2025
@smnandre
Copy link
Member Author

Hmm... the LazyChoiceLoader is only available in Symfony 7.2 :|

https://symfony.com/blog/new-in-symfony-7-2-lazy-choice-loader

What do we do ? Revert (but then the deprecation is a bit strange to be honest...) or bump requirements ?

@carsonbot carsonbot added Status: Reviewed Has been reviewed by a maintainer and removed Status: Needs Review Needs to be reviewed labels Sep 25, 2025
@Kocal
Copy link
Member

Kocal commented Sep 25, 2025

Hmm... the LazyChoiceLoader is only available in Symfony 7.2 :|

symfony.com/blog/new-in-symfony-7-2-lazy-choice-loader

What do we do ? Revert (but then the deprecation is a bit strange to be honest...) or bump requirements ?

In the deprecation we mentioned to use the Symfony\Component\Form\ChoiceList\Loader\LazyChoiceLoader, which imply to use Symfony Form 7.2.
Since this version is compatible with Symfony packages 6.4 (https://github.com/symfony/form/blob/7.2/composer.json), we could bump requirements (and add an explicit dependency on symfony/form, since the feature is not optional AFAIK?)

@Kocal Kocal force-pushed the remove-deprecation-autocomplete branch 2 times, most recently from 494932a to 79b8b29 Compare November 17, 2025 22:04
@Kocal
Copy link
Member

Kocal commented Nov 17, 2025

Hmm... the LazyChoiceLoader is only available in Symfony 7.2 :|
symfony.com/blog/new-in-symfony-7-2-lazy-choice-loader
What do we do ? Revert (but then the deprecation is a bit strange to be honest...) or bump requirements ?

In the deprecation we mentioned to use the Symfony\Component\Form\ChoiceList\Loader\LazyChoiceLoader, which imply to use Symfony Form 7.2. Since this version is compatible with Symfony packages 6.4 (symfony/form@7.2/composer.json), we could bump requirements (and add an explicit dependency on symfony/form, since the feature is not optional AFAIK?)

Finally I went for another solution. Since the BaseEntityAutocompleteType is only registered as a service when symfony/form is available, I added a check that throws an exception if LazyChoiceLoader does not exist, telling the user to install Symfony Form >= 7.2.

@Kocal Kocal force-pushed the remove-deprecation-autocomplete branch from 79b8b29 to 532a5e1 Compare November 17, 2025 22:11
@Kocal
Copy link
Member

Kocal commented Nov 17, 2025

Thank you @smnandre.

@Kocal Kocal merged commit 1abe58a into symfony:3.x Nov 17, 2025
24 of 27 checks passed
@Kocal Kocal deleted the remove-deprecation-autocomplete branch November 17, 2025 22:35
Kocal added a commit that referenced this pull request Nov 17, 2025
This PR was merged into the 3.x branch.

Discussion
----------

[Vue] Remove deprecations for 3.0

| Q              | A
| -------------- | ---
| Bug fix?       | no
| New feature?   | yes <!-- please update src/**/CHANGELOG.md files -->
| Deprecations?  | no <!-- if yes, also update UPGRADE-*.md and src/**/CHANGELOG.md -->
| Documentation? | no <!-- required for new features, or documentation updates -->
| Issues         | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License        | MIT

<!--
Replace this notice by a description of your feature/bugfix.
This will help reviewers and should be a good start for the documentation.

Additionally (see https://symfony.com/releases):
 - Always add tests and ensure they pass.
 - For new features, provide some code snippets to help understand usage.
 - Features and deprecations must be submitted against branch main.
 - Update/add documentation as required (we can help!)
 - Changelog entry should follow https://symfony.com/doc/current/contributing/code/conventions.html#writing-a-changelog-entry
 - Never break backward compatibility (see https://symfony.com/bc).
-->

Looks like #3101 disappeared when rebasing/merging #3103...?

Commits
-------

f4db350 [Vue] Remove deprecations for 3.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Autocomplete Status: Reviewed Has been reviewed by a maintainer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants